import store from '../store'

export default {
  install(Vue) {
    Vue.mixin({
      methods: {
        getAuth(index) {
          let permissions = store.state.user.userInfo.permissions || [];
          if (permissions.findIndex(item => {
            return item.symbol == index
          }) != -1)
            return true
          else
            return false
        }
      }
    })
  }
}
